Conversation
JaCoCo code coverage report - scala 2.12.12
|
ABLL526
left a comment
There was a problem hiding this comment.
LGTM, the only thing is the txt file. Can you remove the comments from it?
Other than that I will approve
|
The jmf-rules.txt file acts as a template for the project as part of Morana usage. The workflow will be updated to run coverage. For reference, see: https://github.com/MoranaApps/jacoco-method-filter/blob/master/jmf-rules.template.txt |
|
JaCoCo code coverage report - scala 2.12.12
No changed file in reports. |
TheLydonKing
left a comment
There was a problem hiding this comment.
Just read the code, makes sense to me.
| jacocoReportName := s"spark-data-standardization Jacoco Report - scala:${scalaVersion.value}" | ||
| jacocoReportFormats := Set("html", "xml") | ||
|
|
||
| // jacocoExcludes := Seq("za/co/absa/standardization/udf/UDFBuilder*", "za/co/absa/standardization/udf/UDFNames") |
There was a problem hiding this comment.
Hi @miroslavpojer we also thinking about excluding some tests using the filter method please have a look for a comment
There was a problem hiding this comment.
See my proposal. It filter out UDFName vals. You can place it into Project rules part of jmf-rules.txt file.
# UDFNames object — final val string constant accessors
# UDFNames* matches both UDFNames$ (module) and UDFNames (static forwarders)
za.co.absa.standardization.udf.UDFNames*#stdCastErr() id:udfnames-stdCastErr
za.co.absa.standardization.udf.UDFNames*#stdNullErr() id:udfnames-stdNullErr
za.co.absa.standardization.udf.UDFNames*#stdSchemaErr() id:udfnames-stdSchemaErr
za.co.absa.standardization.udf.UDFNames*#arrayDistinctErrors() id:udfnames-arrayDistinctErrors
za.co.absa.standardization.udf.UDFNames*#cleanErrCol() id:udfnames-cleanErrCol
za.co.absa.standardization.udf.UDFNames*#errorColumnAppend() id:udfnames-errorColumnAppend
za.co.absa.standardization.udf.UDFNames*#binaryUnbase64() id:udfnames-binaryUnbase64
miroslavpojer
left a comment
There was a problem hiding this comment.
- pulled
- ran jacoco locally
| lazy val ow2Version = "9.5" | ||
| lazy val jacocoVersion = "0.8.10-absa.1" | ||
|
|
||
| def jacocoUrl(artifactName: String): String = s"https://github.com/AbsaOSS/jacoco/releases/download/$jacocoVersion/org.jacoco.$artifactName-$jacocoVersion.jar" | ||
| def ow2Url(artifactName: String): String = s"https://repo1.maven.org/maven2/org/ow2/asm/$artifactName/$ow2Version/$artifactName-$ow2Version.jar" | ||
|
|
||
| addSbtPlugin("com.jsuereth" %% "scala-arm" % "2.0" from "https://repo1.maven.org/maven2/com/jsuereth/scala-arm_2.11/2.0/scala-arm_2.11-2.0.jar") | ||
| addSbtPlugin("com.jsuereth" %% "scala-arm" % "2.0" from "https://repo1.maven.org/maven2/com/jsuereth/scala-arm_2.12/2.0/scala-arm_2.12-2.0.jar") | ||
|
|
||
| addSbtPlugin("za.co.absa.jacoco" % "report" % jacocoVersion from jacocoUrl("report")) | ||
| addSbtPlugin("za.co.absa.jacoco" % "core" % jacocoVersion from jacocoUrl("core")) | ||
| addSbtPlugin("za.co.absa.jacoco" % "agent" % jacocoVersion from jacocoUrl("agent")) | ||
| addSbtPlugin("org.ow2.asm" % "asm" % ow2Version from ow2Url("asm")) | ||
| addSbtPlugin("org.ow2.asm" % "asm-commons" % ow2Version from ow2Url("asm-commons")) | ||
| addSbtPlugin("org.ow2.asm" % "asm-tree" % ow2Version from ow2Url("asm-tree")) |
There was a problem hiding this comment.
I believe all these lines can be removed. They were part of previous jacoco sbt plugin solution.
| // jacocoExcludes := Seq("za/co/absa/standardization/udf/UDFBuilder*", "za/co/absa/standardization/udf/UDFNames") | ||
|
|
||
| // Command aliases for JaCoCo coverage workflow | ||
| addCommandAlias("jacoco", "; jacocoOn; clean; test; jacocoReportAll; jacocoOff") |
There was a problem hiding this comment.
These can be solved using .sbtrc file.
Just mentioning if avoided on purpose.
| jacocoReportName := s"spark-data-standardization Jacoco Report - scala:${scalaVersion.value}" | ||
| jacocoReportFormats := Set("html", "xml") | ||
|
|
||
| // jacocoExcludes := Seq("za/co/absa/standardization/udf/UDFBuilder*", "za/co/absa/standardization/udf/UDFNames") |
There was a problem hiding this comment.
See my proposal. It filter out UDFName vals. You can place it into Project rules part of jmf-rules.txt file.
# UDFNames object — final val string constant accessors
# UDFNames* matches both UDFNames$ (module) and UDFNames (static forwarders)
za.co.absa.standardization.udf.UDFNames*#stdCastErr() id:udfnames-stdCastErr
za.co.absa.standardization.udf.UDFNames*#stdNullErr() id:udfnames-stdNullErr
za.co.absa.standardization.udf.UDFNames*#stdSchemaErr() id:udfnames-stdSchemaErr
za.co.absa.standardization.udf.UDFNames*#arrayDistinctErrors() id:udfnames-arrayDistinctErrors
za.co.absa.standardization.udf.UDFNames*#cleanErrCol() id:udfnames-cleanErrCol
za.co.absa.standardization.udf.UDFNames*#errorColumnAppend() id:udfnames-errorColumnAppend
za.co.absa.standardization.udf.UDFNames*#binaryUnbase64() id:udfnames-binaryUnbase64
Release notes:
closes #89